<%@page import="com.mongodb.BasicDBObject"%>
<%@page import="com.mongodb.DBObject"%>
<%@page import="com.mongodb.DBCursor"%>
<%@page import="devboard.dbutil.MongoUtil"%>
<%@page import="com.mongodb.DBCollection"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Frame Style Beta</title>
		<link rel="stylesheet" href="css/Main.css" type="text/css">
		<link rel="icon" type="image/png" href="favicon.png" >
		<script type="text/javascript" src="js/Main.js"></script>
		<%
		DBCollection properties=MongoUtil.getCollection("Properties");
		DBObject props=properties.findOne(new BasicDBObject("_id",(String)request.getSession().getAttribute("_id")));
		if(props!=null){
			%>
			<style type="text/css">
				body {
					background-image: url("<%=props.get("backgroundImage") %>");
				}
			</style>
			<%
		}
		%>
	</head>
	<body onLoad="init()">
		<div id="indicatorBar">
			<div id="indicator_devboard" onclick="showHideDBMenu()" class="Indicator">
				<img id="" src="css/favicon.png" width="60">
				<span id="devboard_menu"><a style="text-decoration:none; color:silver;" href="Login.jsp?logout=true">logout</a></span>
			</div>
			<div id="indicator_Chat" class="Indicator" onclick="expandFrame('frame_Chat')">
				<img src="css/chatForBar.png" width="60"  alt="Chat">
			</div>
			<div id="indicator_Filter" class="Indicator" onclick="expandFrame('frame_Filter')">
				<img src="css/filterForBar.png" width="60"  alt="Filter">
			</div>
			<div id="indicator_Board" class="Indicator" onclick="expandFrame('frame_Board')">
				<img src="css/boardForBar.png" width="60"  alt="Board">
			</div>
			<div id="indicator_Planning" class="Indicator" onclick="expandFrame('frame_Planning')">
				<img src="css/planningForBar.png" width="60"  alt="Planning">
			</div>
		</div>
		
		<div id="frame_Chat" class="Frame" style="<%=props.get("frame_Chat") %>">
			<div id="head_Chat" class="FrameHead">
				<span class="minimize" onclick="minimizeFrame(this.parentNode.parentNode)">
					<img src="css/minimize-icon.png" width="25" alt="minimize">
				</span>
				<span class="reloadButton" onclick="reloadFrame('iframe_frame_Chat')">
					<img src="css/reload.png" width="25" alt="reload">
				</span>
				chat
			</div>
			<iframe id="iframe_frame_Chat" src="Chat.html" seamless="seamless"></iframe>				
		</div>
		
		<div id="frame_Filter" class="Frame" style="<%=props.get("frame_Filter") %>">
			<div id="head_Filter" class="FrameHead">
				<span class="minimize" onclick="minimizeFrame(this.parentNode.parentNode)">
					<img src="css/minimize-icon.png" width="25" alt="minimize">
				</span>
				<span class="reloadButton" onclick="reloadFrame('iframe_frame_Filter')">
					<img src="css/reload.png" width="25" alt="reload">
				</span>
				filter
			</div>
			<iframe id="iframe_frame_Filter" src="Filter.jsp" seamless="seamless"></iframe>				
		</div>
		
		<div id="frame_Board" class="Frame" style="<%=props.get("frame_Board") %>">
			<div id="head_Board" class="FrameHead">
				<span class="minimize" onclick="minimizeFrame(this.parentNode.parentNode)">
					<img src="css/minimize-icon.png" width="25" alt="minimize">
				</span>
				<span class="reloadButton" onclick="reloadFrame('iframe_frame_Board')">
					<img src="css/reload.png" width="25" alt="reload">
				</span>
				board
				<input id="find" type="text" onkeypress="handleKey(this, event);" size="5">
			</div>
			<iframe id="iframe_frame_Board" src="Task.jsp" seamless="seamless"></iframe>				
		</div>
		
		<div id="frame_Planning" class="Frame" style="<%=props.get("frame_Planning") %>">
			<div id="head_Planning" class="FrameHead">
				<span class="minimize" onclick="minimizeFrame(this.parentNode.parentNode)">
					<img src="css/minimize-icon.png" width="25" alt="minimize">
				</span>
				<span class="reloadButton" onclick="reloadFrame('iframe_frame_Planning')">
					<img src="css/reload.png" width="25" alt="reload">
				</span>
				planning
			</div>
			<iframe id="iframe_frame_Planning" src="Planning.jsp" seamless="seamless"></iframe>				
		</div>
	</body>
</html>